home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
nvdc87
/
curvef
/
cfit1.eka
next >
Wrap
Text File
|
1987-09-02
|
981b
|
44 lines
; CFIT1.EKA
;
; version 1.0
; August 10, 1987
; Copyright (c) Namir Clement Shammas
;
; Least-square fitting between two variables
;
; general model is: f(x) = expression of variable x
;
; examples:
;
; Simple models
; -------------
;
; linear fitting ---> f(x) = a0 + a1 * x
; power fitting ---> f(x) = a0 * x^a1
; logarithmic fitting ---> f(x) = a0 + a1 * Ln(x)
; exponential fitting ---> f(x) = exp(a0 + a1 * x)
; reciprocal fitting ---> f(x) = a0 + a1 / x
; square-root fitting ---> f(x) = a0 + a1 * sqrt(x)
;
; Advanced models
; ---------------
;
; quadratic fitting ---> f(x) = a0 + a1 * x + a2 * x^2
; cubic fitting ---> f(x) = a0 + a1 * x + a2 * x^2 + a3 * X^3
; hybrid fitting e.g.:
; f(x) = b1 / x + b0 * Ln(x) + a0 + a1 * x + a2 *x^2
$ substlevel = 0
; state selected model here
; Model: power
f(x) = a0 * x^a1
f(1) = 1
f(2) = 4.1
f(3) = 8.9
f(4) = 16
f(5) = 25